home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr25
/
msgxp120.zip
/
MSGX.DOC
< prev
next >
Wrap
Text File
|
1993-03-16
|
23KB
|
529 lines
MsgX
Message Extraction Utility
Version 1.20 BETA
Dave Fisher
LiveNet, 1:170/110@fidonet
Description
MsgX is a message extraction program that will select messages
from any *.MSG or Squish formatted area base and store them in a
text file or archive. MsgX will allow you to specify date ranges
of messages to extract. It is mainly intended to act as an
archival and storage method for echoes and can be run on a daily,
weekly, or monthly basis. The collected messages can optionally
be compressed into an archive using your favorite archival
program. If desired, MsgX will also add an entry in the
specified FILES.BBS for the newly created archive.
MsgX can archive multiple areas to one archive in a single pass.
If you are running MsgX under OS/2, you will need the file
MSGAPI.DLL in one of the directory paths specified using the
LIBPATH variable.
If you are running MsgX under DOS, there are no special
instructions.
Usage
MsgX [@CtlFile] AreaTag(OutputFile) [, AreaTag(OutputFile), ...]
/[no]AppendMsgs default: NoAppendMsgs
/Archive = <path+file name> default: "Constructed"
/[no]Compress default: NoCompress
/Config = <path+file name> default: MsgX.Cfg
/[no]Control default: NoControl
/Dates = (from_date, to_date) default: All dates
/Description = "<filesbbs desc>" default: "Constructed"
/[no]Kill default: NoKill
/LimitSize = <number of messages> default: No Limit
OR
/LimitSize = (threshold, del cnt) default: No Limit
/[no]Log default: NoLog
/LogFile = <path+file name> default: None
/LogLevel = <1..4> default: 4
/Margin = <right margin> default: 79
/[no]Quiet default: NoQuiet
/[no]Seenbys default: NoSeenBys
/Skip = <number of messages> default: 0
/[no]Statistics default: Statistics
/Title = "<header title>" default: "Constructed"
/[no]Update default: NoUpdate
/[no]Write default: Write
Notes on the syntax:
Qualifiers can appear in any order, and are only significant
to four characters. Thus, /Statistics is the same as /Stat.
If a qualifier follows a quote mark ("), please separate
with a space. For example, the following line is incorrect:
/description = "Men's Issue Forum"/noseenbys/update
The following is correct:
/description = "Men's Issue Forum" /noseenbys/update
Normally, qualifiers can be next to each other, but due to
technicalities with the language used for MsgX and the
operating system, the above caveat applies.
Disclaimer!
This program is shareware. There is absolutely no warranty for
this program or guarantee that it will work. The user of the
program assumes all risk. While I feel confident that this
program will not harm your system in any way, by using this
program, you agree to assume full responsibility for any adverse
effect to your system.
Ok. Now with that out of the way -- please send me mail and let
me know if you are using MsgX! I'd like to get an idea of
whether this program has been useful for others, as it has been
for me. Also, please send any comments, suggestions and/or
problem reports. I can be reached at:
Dave Fisher
LiveNet, 1:170/110@fidonet.org
Parameters
@CtlFile
---------------------------------------------------------
If a control file is specified, all command line parameters and
qualifiers will be read form that file instead of the command
line itself. This is helpful is you have too many options or
areas specified, and they will not fit on the command line due to
the limitation imposed from the operating system.
If @CtlFile is specified, do not specify any other parameters on
the command line. For example: "MsgX @c:\bbs\msgxos2" is valid
whereas "MsgX @c:\bbs\msgxos2 /Date=( previous week )" is not.
In this example, /Date should be written in msgxos2.ctl.
If an extention is not specified, MsgX will default to the
extension to .CTL. See file Example.Ctl for more information.
AreaTag(Output_File_Name)
---------------------------------------------------------
This parameter is the areatag name as specified in Maximus's
message control file (usually named MSGAREA.CTL). You can
specify as many tag names as will fit on the command line.
Separate each tag name with a comma. Note that local message
areas and the netmail area do not have "echotag" names. In order
to extract messages from these areas, you will have to specify
the name of the area as defined by the "Area [name]" statement in
MSGAREA.CTL. For echos, use the "MsgName [name]" names.
AreaTag may include wildcard match characters '*' for multiple
character matches, and/or '?' for single character matches.
An optional file name may also be specified within parenthesis.
This is the name of the text file that will be created. This
text file includes a very short header and then all the collected
messages from the area.
If the /Compress option is enabled, the files will be created
within the Work Directory. They will be deleted after they are
successfully compressed. Therefore, do not specify a path for
the text files if you are compressing them. If you are not
compressing the files, then Output_File_Name can have a fully
qualified path. If it does not, the file will be created in the
current directory.
The output file name can include one or more of the following
date expansion macros:
%a - The abbreviated weekday name
%A - The full weekday name
%b - The abbreviated month name
%B - The full month name
%d - Day-of-month as a decimal (01-31)
%j - Day-of-year as a decimal (001-365)
%J - Day-of-year as a year/julian decimal (n001-n365)
where 'n' is the last digit of the year
%m - Month as a decimal (01-12)
%w - Weekday as a decimal (1-7), Sunday being 1,
Saturday 7
%W - Weekday as a decimal (1-7), Monday being 1,
Sunday 7
%y - Year without century (00-99)
%Y - Year including century (1970-2069)
All macros are expanded based on the TO date of the date range.
Please note that each macro is case sensitive.
NOTE: If no file name is given within, the default file name
will be the AreaTag name with the extension of .TXT.
For example:
MsgX OS2BBS, OS2, OS2LAN, OS2HW, OS2DOS
/Dates = ( previous week )
/Archive = c:\max\files\echos\OS%y%m%d
/Compress
/Update
This will extract all messages from the indicated areas for the
previous week. They will be stored in individual text files
named OS2BBS.TXT, OS2.TXT, etc. and compressed within one archive
named OS920321.ZIP (if the end of the week was March 20, 1992 and
the archive method was PKZIP).
The example could have also been written like this:
MsgX OS2BBS(OA%y%m%d), OS2(OB%y%m%d), OS2LAN(OC%y%m%d),
OS2HW(OD%y%m%d), OS2DOS(OE%y%m%d)
/Dates = ( previous week )
/Archive = c:\max\files\echos\OS%y%m%d
/Compress
/Update
Where each individual text file is now named with the year,
month, and day as the archive.
MsgX will automatically determine whether the area is Squish or
*.MSG format.
Qualifiers
/[no]AppendMsgs
---------------------------------------------------------
The qualifier will first extract any text files from the
specified archive into the Work Directory. Any extracted
messages will then be appended to these files (if the file names
match the files that were in the archive, of course).
Appending messages is the default behavior of MsgX. So if a file
was left in the Work Directory by mistake and that file matched
the name of the current extraction, there is a risk that messages
will be appended to that file. Thus, it is a good idea to let
MsgX take full control of the Work Directory.
/Archive
---------------------------------------------------------
If the /Compress qualifier is active, you can specify the name of
the archive. (MsgX will ignore an extension if you put one on
it.)
If you are only extracting ONE area and do not specify an archive
name with /Archive (or in the configuration file), MsgX will
create an archive with the same base name as the text file of
messages.
If you are extracting MULTIPLE areas and do not specify an
archive name with /Archive (or in the configuration file), MsgX
will create the archive ECHOS.ZIP in the current directory.
The archive name can be a fully qualified path and may include
any of the date expansion macros (%d, %m, etc.).
/[no]Compress
---------------------------------------------------------
This qualifier allows you to compress the output file(s) into a
.ZIP archive. If extracting only one area, the name of the
archive will be identical to the output file name, except the
extension will be changed to .ZIP. If extracting multiple areas,
the name of the archive must be specified using /Archive.
If the archive exists, new message text files will either be
added or updated in the archive. If the archive does not exist,
then a new one will be created.
After the archive is successfully created or updated, the
original uncompressed output text file(s) will be deleted.
Config = <path+file name>
---------------------------------------------------------
This is the name of the configuration file. The default is
MsgX.Cfg in the current directory. You can also define the
environment variable MSGX_CONFIG=<path+file name> instead of
using this qualifier.
/[no]Control
---------------------------------------------------------
This qualifier controls whether CONTROL information (such as
PATH, REALNAME, etc) should be included in the message. The
default is /NoControl.
/Dates=(from_date, to_date)
---------------------------------------------------------
This qualifier will designate which dated messages should be
selected from the area. Messages will be selected based on the
date they were received into the BBS (not the date the message
was written).
The 'from_date' and 'to_date' is formatted as dd-mmm-yyyy. For
example, January 1, 1992 is represented as 1-Jan-1992, December
25, 1991 as 25-Dec-1991, etc.
The following keywords can be used in place of 'from_date' and
'to_date':
/date = ( current month )
/date = ( current week )
/date = ( current day )
/date = ( previous month )
/date = ( previous week )
/date = ( previous day )
The calculated 'current' or 'previous' date will be relative to
the current computer date/time. These keywords can be very
helpful if you want to have the messages archived automatically
at the end of the week or month.
/Description = "<filesbbs desc>"
---------------------------------------------------------
If you choose the /Update option, you can specify the description
line for the archive file. This description line may include any
of the date expansion macros available (%m, %y, etc.).
If the archive already existed, and message text files were
therefore added or updated, the FILESBBS will not be updated.
The file will only be updated when a new archive has been
created.
/[no]Kill
---------------------------------------------------------
This will kill any messages that are successfully extracted. If
/NoWrite is specifed, messages will still be deleted. This gives
MsgX the ability to manage the size and/or content of a message
base.
/LimitSize = <number of messages>
/LimitSize = ( threshold, delete_count )
---------------------------------------------------------
This qualifier has two possible meanings, depending upon the
number of parameters used. In both cases, this qualifier will
override any date ranges specified. If /Compress is specified,
messages will first be archived and then deleted.
If you wish to save the first or so messages, be sure to specify
/Skip.
The first form indicates the final size of the message base.
Thus, if there are 212 messages in the message base and
/LimitSize=200 is indicated, the first 12 messages will deleted
(unless /Skip is used, in which case the first 12 messages after
the specified number of messages are skipped).
The second form indicates that a certain number of messages
(delete_count) should be deleted only if there are 'threshold'
number of messages already there. For example, if there are 212
messages in the message base and /LimitSize=( 200, 50 ), then the
first 50 messages will be extracted from the message base,
resulting in a final message base size of 162. If SMOG were run
again, then nothing would be extracted since 162 is less than 200
messages. Once again, if /Skip is specified, then the specified
number of messages will first be skipped.
/[no]Log
---------------------------------------------------------
This qualifier will turn the logging function on and off.
/LogFile = <path+file name>
---------------------------------------------------------
This qualifier defines the name of the log file.
/LogLevel = <1..4>
---------------------------------------------------------
This qualifier defines the level of message detail in the log
file. Level 1 is the least detailed, while Level 4 is the most
verbose. The levels indicate the 'importance' of a message,
where Level 1 is the most important (usually error messages).
/Margin=<right margin>
---------------------------------------------------------
This qualifier will control the length of the line for each
message. The default is 79, but can be changed to anything
between 1 and 132.
/[no]Quiet
---------------------------------------------------------
This qualifier controls whether the program should emit an
printed output. If /Quiet, the only output will be the program
copyright line and any error messages. The default is /NoQuiet.
/[no]Seenbys
---------------------------------------------------------
This qualifier controls whether the SEENBY's lines should be
included in the message extraction. The default is /NoSeenBy.
/Skip = <number of messages>
---------------------------------------------------------
This qualifier specifies the number of message to skip before
attempting an extraction and/or deletion. If you are extracting
or deleting from a Squish message base, this qualifier is not
necessary since MsgX will set the number of messages to skip
based on the "-$s" command in Squish.Cfg.
/[no]Statistics
---------------------------------------------------------
This qualifier will produce a day-by-day and summary statistical
analysis of the messages received. Information includes average
messages per day, average bytes per day, largest message size,
etc. The default is /Statistics.
/Title = "<header title>"
---------------------------------------------------------
This qualifier will override the default header title for the
message text file. Normally, MsgX will center a title at the top
of the file of extracted messages. This title is either derived
from the MsgInfo statement in the MsgArea.Ctl file, or
constructed from the area tag name (if the area definition was
read from Squish.Cfg or Areas.Bbs). In the latter case, all
underscores will be replaced with spaces, and words will be
capitalized.
This default construction can be overriden if /Title is
specified. However, please note that if you have specified
multiple areas (or wildcards) that this title will be displayed
at the top of each file. Thus, if you would like to customize
the title, you may want to only specify one area per run of MsgX.
/[no]Update
---------------------------------------------------------
This qualifier tells MsgX to update the file indicated by
/FilesBBS.
If you do not specify a description (using /Description), then
the line added to this file will be in the following format:
If running MsgX for only ONE area:
<Archive file name> <Title> - <Date Range>, where 'Title' is
the name of the area from you Maximus message area control
file (MsgInfo statement).
If running MsgX for multiple areas:
<Archive file name> <Title> - <Date Range>, where 'Title' is
a list of area tag names, separated by commas.
If a the file specified by /FilesBBS does not exist, one will be
created.
/[no]Write
---------------------------------------------------------
This qualifier will control whether the output text file will
created. At first glance, this may seem like a silly qualifier
since this is the primary purpose of MsgX! However, MsgX also
does a brief analysis of the entire area and will display some
statistical information about the area. If you only want the
statistical information, you can specify /NoWrite, and an output
file will not be created.
Examples
The following examples are broken apart on several lines for
display reasons. They would be entered on one line when actually
executed.
Msgx MENS_ISSUES(men%%y%%b.txt)
/Desc="Men's Issues Forum for the Month of %b, %y"
/Archive=c:\max\files\echos\men%%y%%b
/noseenbys/nocontrol
/dates=( current month )/compress/update
The above command exists in a batch file. Notice the double
percent signs (%%). This is necessary since we are not
indicating a batch substitution, and want the batch file to
ignore the percent sign. Only one percent sign will actually be
passed to MsgX. If today's date is February 29, 1992, MsgX will
create the file Men92Feb.txt and archive this to the file
\max\files\echos\Men92Feb.Zip.
MsgX os2 /dates=( previous week )
If the current date is February 12, 1992, MsgX will create the
file Os2.txt in the current directory. This is the week of Feb
2, 1992 to Feb 8, 1992.
The following is a OS/2 .CMD file that runs MsgX:
/*----------------------------------------------------------*
* WEEKLY.CMD *
* *
* Rexx procedure to perform weekly maintenance activities *
*----------------------------------------------------------*/
"c:"
cd "\bbs\msgx"
msgxp "mens_issues(MN%%y%%m%%d.txt)
/archive=c:\max\files\echos\MN%%y%%m%%d
/compress/update/quiet/dates=( previous week )"
if ( rc > 0 ) then
do
echo "Echo not extracted. MsgX error " rc
exit
end
msgxp "os2, Os2bbs, os2prog, os2lan, os2hw, os2dos
/archive=c:\max\files\echos\OS%%y%%m%%d
/compress/update/quiet/dates=( previous week )"
if ( rc > 0 ) then
do
echo "Echo not extracted. MsgX error " rc
exit
end
exit